home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19990725-20000114
/
000442_news@columbia.edu _Tue Jan 11 17:54:29 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2000-01-13
|
3KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id RAA10188
for <kermit.misc@watsun.cc.columbia.edu>; Tue, 11 Jan 2000 17:54:29 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id RAA18863
for kermit.misc@watsun.cc.columbia.edu; Tue, 11 Jan 2000 17:53:02 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
From: jaltman@watsun.cc.columbia.edu (Jeffrey Altman)
Subject: Re: FTP over C-kermit
Date: 11 Jan 2000 22:53:01 GMT
Organization: Columbia University
Message-ID: <85gc8d$id1$1@newsmaster.cc.columbia.edu>
To: kermit.misc@columbia.edu
In article <85ga7s$gc4$1@newsmaster.cc.columbia.edu>,
Frank da Cruz <fdc@watsun.cc.columbia.edu> wrote:
: In article <387BA8C9.40F54E02@seanet.com>,
: Peter Burkholder <peter@geophys.washington.edu> wrote:
: : Can I use C-kermit to pick up files from an
: : FTP server? I'd like to use C-kermit to
: : access a set of seismic data loggers. When
: : I connect to the loggers using telnet protocol,
: : I can specify the data I want, and I'm supplied
: : with a filename that I can pick up over ftp.
: :
: : Clearly, I'd like to automate all this using
: : kermit - making the request, getting the filename
: : and picking up the file using ftp. But it's the
: : last step that confuses me.
: :
: And well it might!
:
: Although FTP uses a Telnet connection for its
: control channel, it uses a separate connection for
: data. So, unfortunately, you can't script a session
: with an FTP server in Kermit.
:
: Built-in FTP support is an oft-requested feature and,
: like many others, it's on our list.
Actually until we have built in FTP support you can use C-Kermit 7.0
with its scripting and PTY support to handle the job on most Unix
platforms.
First, automate the Telnet connection using
SET NETWORK TYPE TCP/IP
SET HOST <host> telnet
followed by INPUT and OUTPUT commands to retrieve the name of the
file to be retrieved. Once you have the filename you can close the
telnet connection and use the new PTY support to control FTP.
CLOSE CONNECTION
SET NETWORK TYPE PTY
SET HOST ftp <host>
The ftp application has now been started under the control of Kermit's
script language. You now use Kermit's INPUT and OUTPUT commands to
script the session
INPUT 5 ftp>
IF FAILURE END Could not start FTP
OUTPUT open <host>\10
INPUT 5 Name
OUTPUT anonymous\10
INPUT 5 Password
OUTPUT yourname@host\10
INPUT 5 ftp>
OUTPUT get \v(myfile)\10
INPUT 5 226 Transfer complete
OUTPUT quit\10
CLOSE CONNECTION
This code is not complete and does not perform all of the error checking
that should be performed but it will give you the general idea. PTY
support is provided on all of the major modern Unix distributions
include Linux, AIX, Solaris, SunOS, HPUX, ...
Jeffrey Altman * Sr.Software Designer * Kermit-95 for Win32 and OS/2
The Kermit Project * Columbia University
612 West 115th St #716 * New York, NY * 10025
http://www.kermit-project.org/k95.html * kermit-support@kermit-project.org